1. Field of the Invention
The present invention generally relates to tesselating iso-surfaces and more specifically to using a graphics processor to produce a tessellated iso-surface from a volumetric description.
2. Description of the Related Art
Iso-surfaces are used to visually represent a set of points from a scalar three-dimensional (3D) field that have a constant value, such that a function of coordinates x, y, and z, f(x,y,z) equals a constant. Iso-surfaces have applications in medical imaging, computational fluid dynamics, astrophysics, molecular modeling, weather forecasting, oil exploration, and finite element analysis. Iso-surfaces also have many potential applications in 3D graphics games and special effects for film production. Iso-surfaces may represent a surface of constant pressure, temperature, velocity, or density.
Conventionally, tessellated iso-surfaces are generated using a central processing unit (CPU) and consume substantial CPU resources. Volumetric data is represented as a sequence of slices of scalar field data. FIG. 1A illustrates a conceptual diagram of prior art slices of values sampled from volumetric data including objects 110, 120, and 130. A slice 101 intersects object 110 and 120, resulting in object slice values 112 and 122 that are sampled by a two-dimensional grid represented by slice 101. Similarly, slice 102 intersects object 130, resulting in object slice values 132.
Conventional techniques known to those skilled in the art, such as the marching cubes algorithm are used to sample the volume data and produce the slices. A lattice of two-dimensional cube arrays is used to sample volumetric data where each cube has eight sample locations, i.e., a sample at each cube corner. The marching cubes algorithm determines the polygon(s) required to represent the iso-surface that passes through each cube.
FIG. 1B illustrates prior art cube intersection patterns according to the marching cubes algorithm. Since each cube has 8 sample locations (vertices), there are 28=256 different ways that an iso-surface can intersect a cube, forming as many as four triangles and including the case where there is no intersection. Accounting for rotations and reflections, there are only 15 unique intersection patterns, as shown in FIG. 1B. Application of the marching cubes algorithm provides the intersection pattern and vertex positions (x,y,z) for each triangle formed by the intersections. The vertices can be used to compute a vertex normal vector for each vertex position that is used to render the iso-surface.
As previously described, tessellated iso-surfaces generated using the marching cubes algorithm consume substantial CPU resources. Accordingly, what is needed in the art is a high-performance system and method for generating a tessellated iso-surface from a volumetric description and the ability to offload the tessellation computations from the CPU.